package com.god530.androidutils.utils;

import android.util.Log;

/**
 * Log统一管理类
 * 
 *  
 */
public class LogUtils
{

	private LogUtils()
	{
		/* cannot be instantiated */
		throw new UnsupportedOperationException("cannot be instantiated");
	}
	// Whether need to print the bug, can be int the application of onCreate initialization function
	public static boolean isDebug = true;
	private static final String TAG = "sainthigh";

	// The following four is the default function of the tag
	public static void i(String msg)
	{
		if (isDebug)
			Log.i(TAG, msg);
	}

	public static void d(String msg)
	{
		if (isDebug)
			Log.d(TAG, msg);
	}

	public static void e(String msg)
	{
		if (isDebug)
			Log.e(TAG, msg);
	}

	public static void stackTrace(Exception e) {
		if(isDebug) {
			e.printStackTrace();
		}
	}
	
	public static void v(String msg)
	{
		if (isDebug)
			Log.v(TAG, msg);
	}

	// The following is a function of the incoming custom tag
	public static void i(String tag, String msg)
	{
		if (isDebug)
			Log.i(tag, msg);
	}

	public static void d(String tag, String msg)
	{
		if (isDebug)
			Log.i(tag, msg);
	}

	public static void e(String tag, String msg)
	{
		if (isDebug)
			Log.i(tag, msg);
	}

	public static void v(String tag, String msg)
	{
		if (isDebug)
			Log.i(tag, msg);
	}
}